Macro "Application.Run "EikonRefreshAll", True, 30000" not working
I am using Eikon Refinitiv in Excel as add-in.
Office 365.
VBA.
Windows 10.
I have a workbook with numerous worksheets, in which there are Refinitiv formulas. There are two types of formulas used:
1) Screeners in the form of formula TR(Screen.
2) data retrieval in form of RHistory.
3) data retrieval in form of TR
When trying to run the following macro I do not get results for all interations (manually I get results for each date) or when data is retrieved through macro it shows bad results (not the same when I carry out calculations manually instead of by macro).
It seems as if the Refinitiv formulas do not refresh properly. I tried different time intervals for Application.Run "EikonRefresAll",True (from 30000 to 300000) with no positive solution.
Please let mi know what formula should I use to update Refinitiv formulas in workbook, so that I do not have to manually perform 28 calculations each time for different dates analyzed.
Macro:
Sub new_macro()
'MACRO TO COPY CALCULATED RESULTS
Dim licznik_dat As Integer
For licznik_dat = 1 To 28
Worksheets("DATES TO BE CHECKED").Range("C2").Offset(licznik_dat - 1, 0).Copy
Worksheets("Choose").Range("C7").PasteSpecial xlValues
DoEvents
Application.Run "EikonRefreshAll", True, 30000
DoEvents
Worksheets("Choose").Range("C39").Copy
Worksheets("DATES TO BE CHECKED").Range("D2").Offset(licznik_dat - 1, 0).PasteSpecial xlValues
Next licznik_dat
End Sub
Best Answer
-
@monika.braszczok So without seeing your sheets its a bit difficult to see where or if there is a bottleneck. So just to be clear - this was working before and has now stopped working? You have the local spreadsheet on Manual Calc - and then wanting to refresh the data periodically followed by a recalc? There are different options for the refresh function - please see this thread for details. Also see this guide here
From the thread you can see the following 4 functions operate asynchronously:
1 - Application.Run "PLRefreshAllEventHandler" to refresh functions in all open workbooks
2 - Application.Run "PLRefreshWorkbookEventHandler" to refresh functions in the current workbook
3 - Application.Run "PLRefreshWorksheetEventHandler" to refresh functions in the current worksheet
4 - Application.Run "PLRefreshSelectionEventHandler" to refresh functions in the selected range
The following Refresh commands allow for a synchronous refresh to occur (one line of VBA code needs to finish executing before the next line can begin). Note they do not refresh TF functions:
1 - Application.Run "EikonRefreshSelection"
2 - Application.Run "EikonRefreshWorksheet"
3 - Application.Run "EikonRefreshWorkbook"
4 - Application.Run "EikonRefreshAll"
I don't know how large your sheets are or what if any race conditions are occurring or leading to timeout. Are you able to try the asynch functions to see if they can help (they dont have the refresh parameters? Also maybe try to see if this is working for 1 sheet properly and try sheet by sheet as there might be an issue with some instrument or screener query taking a long time to complete. Let us know if this helps at all.
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛